@echo off
SET DIR=%~dp0%
IF '%1'=='/?' goto usage
IF '%1'=='-?' goto usage
IF '%1'=='?' goto usage
IF '%1'=='/help' goto usage
IF '%1'=='help' goto usage
%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Threading.Thread]::CurrentThread.CurrentCulture = '';[Threading.Thread]::CurrentThread.CurrentUICulture = '';& import-module -name '%DIR%lib\Dagent.psm1';& '%DIR%Dagent.ps1' %*"
goto :eof

:usage
%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Threading.Thread]::CurrentThread.CurrentCulture = '';[Threading.Thread]::CurrentThread.CurrentUICulture = '';& import-module -name '%DIR%lib\Dagent.psm1';& '%DIR%Dagent.ps1'"